# main.py 文件内容，包含学生姓名或学号
# Student Name: 范飞雪
# Student ID: 40516210206
tasks = []


def add_task(task):
    tasks.append(task)
    print(f"Added task: {task}")
    
def view_tasks():
    print("Tasks:")
    for task in tasks:
        print(f"- {task}")
def main():
    print("Welcome to the TODO app!")
    while True:
        task = input("Enter a task (or 'view' to see all tasks, 'exit' to quit): ")
    if task == "view":
        view_tasks()
    elif task == "exit":
        break
    else:
        add_task(task)
if __name__ == "__main__":
    main()